<?php

$_CLASS['prossimoClienteCLS'] = "class_php/prossimoClienteCLS.php";

class workbench extends Module
{
	var $socket = 0;
	var $analyzeArray = 1;
	var $analyzeError = 1;
	var $connDB = 1;
	var $func = 1;
	var $funcDB = 0;
	var $sqlFunc = 1;
	var $request = array();
	var $smarty = 1;
	var $session = array();
	var $impBase = array();
	var $fldError = array();
	var $usrError = array();
	var $sysError = array();
	var $usrInfo = array();
	var $usrInfoFuncJS = '';
	var $usrInfoValueBtn = '';
	var $extClass = array();
	var $appLog = 1;
	var $lastPageNo = 0;
	var $menu = 1;
	var $security = 1;
	
	function start()
	{
// 		print_r($this->session);
// 		print_r($this->request);
		if  ( $this->request["exitConsole"] == 'S' )
		{
			//effettuo il logout
			$this->prossimoClienteCLS->interfaceAgentInsert("onLogout","SIP/".$this->session["operatore"],'0');
			
			//inposto il vecchio login come lavorato in modo 
			$this->session["idStatoOperatore"] = $this->prossimoClienteCLS->interfaceAgentCheck("onLogin","SIP/{$this->session["operatore"]}|{$this->session["idCampagna"]}",'0,1');
			$this->prossimoClienteCLS->interfaceAgentUpdate($this->session["idStatoOperatore"],'3');
			
			$this->session["loginConsole"] = '';
			$this->session["idStatoOperatore"] = '';
			$this->session["idInterfaccia"] = '';
			$this->session["statusCall"]= '';
			$this->session["telefono"]= '';
			$this->session["chiamataId"]= '';
		}

		
		$this->fillValue("urlCampagna", $this->session);
	}

	function show()
	{		
		if  ( $this->request["exitConsole"] == 'S' )
		{
		    $redirect['mod'] = "utente";
		    $redirect['do'] = "home";
// 		    $redirect['extra'] = "typeList=".$this->request["typeList"]."&urlCampagna=".$this->request["urlCampagna"];
		    return $redirect;

		}
		else
		{
			$this->smarty->assign("mod","campagne");
			$this->smarty->assign("do","workbench");
			$this->smarty->assign("page","workbench");

			$this->smarty->display($this->session["ruolo"]."/campagne/workbench.tpl.html");
		}
	}
}

?> 
 
 
